home *** CD-ROM | disk | FTP | other *** search
- property ancestor, pMIAW, pCursor
- global gEnvironObj, gDataTooBigAlert, gTableClipboard, gIsRolloverTextOn
-
- on new me, buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant
- if objectp(descendant) then
- ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant)
- else
- ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, me)
- end if
- pCursor = [member("point hand", "graph.cst"), member("point hand mask", "graph.cst")]
- return me
- end
-
- on enable me
- if listp(gTableClipboard) then
- enable(ancestor)
- set the cursor of sprite the pChannel of me to pCursor
- end if
- return me
- end
-
- on disable me
- disable(ancestor)
- set the cursor of sprite the pChannel of me to -1
- end
-
- on setMIAW me, miaw
- pMIAW = miaw
- return me
- end
-
- on performFunction me
- if listp(gTableClipboard) then
- isDataTooBig = 0
- if checkIfSelected(getTable(pMIAW)) then
- tell the stage
- playSFX(5)
- end tell
- if checkPasteDataSize(getTable(pMIAW), gTableClipboard) then
- setSelectedData(getTable(pMIAW), gTableClipboard)
- else
- isDataTooBig = 1
- end if
- else
- beep()
- end if
- if isDataTooBig then
- tell the stage
- openAlertWindow("badpaste", rect(0, 0, 320, 171))
- end tell
- end if
- end if
- return me
- end
-
- on performRolloverFunction me
- if gIsRolloverTextOn then
- performRolloverFunction(ancestor)
- end if
- return me
- end
-
- on performRolloffFunction me
- if gIsRolloverTextOn then
- performRolloffFunction(ancestor)
- end if
- return me
- end
-